#include "Point.h"
#include "Polygon.h"
#include "Rectangle.h"
#include <iostream>

using std::cout;
using std::endl;

const int COUNT = 4;


int main() {

		Point p1(2,4);
		p1.print();
		Point p2(4,5);
		p2.print();
		Point p3(8,5);
		p2.print();
		cout<<endl;
		Rectangle pol(0);

		pol.print();
		pol.addPoint(&p1);
		pol.addPoint(&p2);
		pol.addPoint(&p3);
		pol.addPoint(&p3);
		pol.addPoint(&p3);
		pol.print();

		cout<<endl;
		Rectangle pol2(pol);
		cout<<"\n second \n";
		pol2.print();
		cout << "type is: "<<pol2.getType()<<endl;


		/*Polygon* poly1 = new Polygon();
		for (int i=0; i<COUNT; i++) {
			Point p(i,2*i);
			poly1->addPoint(&p);
		}

		for (int i=0; i<COUNT; i++) {
			cout<<poly1->getPoint(i)->getX()<<" ";
			cout<<poly1->getPoint(i)->getY()<<endl;
		}

		delete poly1;*/
		return 0;

}
